package com.mvp.shq.washer.ui.wallet;

import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.jaeger.library.StatusBarUtil;
import com.mvp.shq.washer.R;
import com.mvp.shq.washer.adapter.BillAdapter;
import com.mvp.shq.washer.base.BaseActivity;
import com.mvp.shq.washer.utils.RecyclerViewDivider;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class WalletActivity extends BaseActivity<WalletPresenter, WalletModel> implements WalletConstract.View {
    @BindView(R.id.recyclerview)
    RecyclerView recyclerView;
    @BindView(R.id.back)
    ImageView back;
    @BindView(R.id.title)
    TextView title;
    @BindView(R.id.tv_balance)
    TextView tvBalance;
    @BindView(R.id.btn_recharge)
    Button btnRecharge;

    @Override
    public int getLayoutId() {
        return R.layout.activity_wallet;
    }

    @Override
    public void initView() {
        StatusBarUtil.setColor(this, ContextCompat.getColor(context, R.color.white), 0);
        title.setText("我的钱包");
        recyclerView.setLayoutManager(new LinearLayoutManager(context));
        RecyclerViewDivider divider = new RecyclerViewDivider(context, LinearLayoutManager.VERTICAL, 30, R.color.white);
        //recyclerView.addItemDecoration(divider);
        recyclerView.setAdapter(new BillAdapter(context));
    }


    @OnClick({R.id.back, R.id.btn_recharge})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.btn_recharge:
                break;
        }
    }
}
